@import '@/assets/styles/mixin.scss';
@import '@vue-flow/core/dist/style.css';
@import '@vue-flow/core/dist/theme-default.css';
* {
  box-sizing: border-box;
}
html {
  width: 100%;
  height: 100%;
  @include scrollBar
}
body {
  width: 100%;
  height: 100%;
  overflow: auto;
  margin: 0 auto;
  background-color: #f5f5f5;
}
body.el-popup-parent--hidden {
  width: 100%!important;
}
#app {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 1921px){
  #app {
    width: 1700px!important;
    margin: 0 auto;
  }
}

@media ( max-width:1920px ) {
  #app {
    width: 100%;
  }
}

h1, h2, h3, h4, p, ul, li {
  margin: 0;
  padding: 0;
}
a,
a:focus,
a:hover {
  cursor: pointer;
  text-decoration: none;
}
div:focus {
  outline: none;
}
ul, ol, li {
  list-style: none;
}
i {
  font-style: normal;
}
img {
  vertical-align: middle;
} 
button {
  cursor: pointer;
}
button[disabled] {
  cursor: not-allowed;
}

input[aria-hidden=true]{
  display: none !important;
}


.m_l10 {
  margin-left: 10px;
}

// 抽取的公共样式
.main-container {
  border-radius: 15px;
  border: 1px solid var(--color-gray-10);
  min-height: calc(100vh - 200px);
  overflow: hidden;
  padding: 15px;
  @include card-shadow;
}

// 主题按钮
.btn {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.42857143;
  text-align: center;
  background-color: var(--color-main);
  color: var(--color-white-10);
  white-space: nowrap;
  vertical-align: middle;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 4px;
  min-width: 60px;
  height: 32px;
}
.btn:hover {
  background-color: var(--color-main-7);
}
.btn[disabled] {
  background: var(--color-gray-10);
  cursor: not-allowed;
}
.btn-red {
  background-color: var(--color-red);
}
.btn-red:hover {
  background-color: var(--color-red-7);
}
.btn-green {
  background-color: var(--color-green);
}
.btn-blue {
  background-color: var(--color-text-hover);
}
.btn-normal {
  color: #909399;
  background: var(--color-normal-background);
  border-color: #d3d4d6;
}
.btn-normal:hover {
  background: var(--color-normal-background-7);
}


// 拉链按钮类
.aniTxtBtn {
  padding: 5px 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 4px;
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 0;
  transition: color 0.3s linear;
  cursor: pointer;
}
.aniTxtBtn:before {
  content: '';
  width: 0;
  height: 2px;
  // background-color: #1630f1;
  background-color: var(--color-main)!important;
  position: absolute;
  left: 0;
  z-index: -1;
  transition: width 0.3s linear;
}
.aniTxtBtn.green:before {
  background-color: var(--color-green)!important;
}
.aniTxtBtn.red:before {
  background-color: var(--color-red)!important;
}
.aniTxtBtn.blue:before {
  background-color: var(--color-text-hover)!important;
}

.aniTxtBtn:after {
  content: '';
  width: 100%;
  height: 0;
  // background-color: #1630f1;
  background-color: var(--color-main)!important;
  position: absolute;
  z-index: -1;
  transition: height 0.3s linear;
}
.aniTxtBtn.green:after {
  background-color: var(--color-green)!important;
}
.aniTxtBtn[disabled].green:after {
  background-color: var(--color-black-10)!important;
}
.aniTxtBtn.red:after {
  background-color: var(--color-red)!important;
}
.aniTxtBtn[disabled].red:after {
  background-color: var(--color-black-10)!important;
}
.aniTxtBtn.blue:after {
  background-color: var(--color-text-hover)!important;
}
.aniTxtBtn[disabled].blue:after {
  background-color: var(--color-black-10)!important;
}
.aniTxtBtn:hover:before {
  width: 100%;
}
.aniTxtBtn:hover:after {
  transition-delay: 0.3s;
  height: 100%;
  border-radius: 8px;
}
.aniTxtBtn:hover {
  color: var(--color-white-10)!important;
  transition-delay: 0.3s;
}
.aniTxtBtn[disabled] {
  cursor: not-allowed!important;
  color: var(--color-black-10)!important;
}
.aniTxtBtn[disabled]:hover {
  color: var(--color-white-10)!important;
}
.aniTxtBtn[disabled]:hover:before {
  background-color: var(--color-black-10)!important;
}
.aniTxtBtn[disabled]:hover:after {
  background-color: var(--color-black-10)!important;
}
// 条件搜索框中的每个条件项
.condition {
  padding: 15px;
  @include content;
  @include flex-center-start;
  flex-wrap: wrap;
}
.condition-item {
  width: 30%;
  height: 60px;
  border: 1px solid var(--color-main-border);
  border-radius: 15px;
  padding: 0 15px;  
  background-color: var(--color-gray-2);
  margin: 10px;
  overflow: hidden;
  @include flex-all-center;
  .condition-label {
    width: 30%;
    text-align: center;
    @include text-overflow-ellipsis;
  }
  .condition-input {
    width: 60%;
  }
}

// 修改elementUI默认样式
.el-table .cell {
  user-select: none!important;
}
.el-select-dropdown .el-select-dropdown__item.is-selected {
  color: var(--color-main)!important;
}
.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path {
  color: var(--color-main)!important;
}
.el-cascader-node .el-radio__input.is-checked .el-radio__inner {
  background: var(--color-main);
  border-color: var(--color-main);
}
.el-cascader .el-input.is-focus .el-input__wrapper {
  box-shadow: 0 0 0 1px var(--color-main, var(--color-main)) inset!important;
}
.condition-input .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--color-main) inset!important;
}
.condition-input .el-select__wrapper.is-focused {
  box-shadow: 0 0 0 1px var(--color-main) inset!important;
}
.condition-input textarea.is-focus {
  box-shadow: 0 0 0 1px var(--color-main) inset!important;
}
.condition-input .el-radio {
  & .el-radio__input {
    display: none;
  }
  & .el-radio__label {
    border: 1px solid var(--color-main-border);
    background-color: var(--color-white-10);
    border-radius: 10px;
    padding: 5px 30px;
    transition: all 0.3s linear;
  }
}
.condition-input .el-radio.is-checked .el-radio__label{
  border: 1px solid var(--color-theme-border);
  background-color: var(--color-main);
  color: var(--color-white-10);
}
.condition-input .el-input-number {
  width: 100%;
}
.condition-input .el-cascader {
  width: 100%;
}
.radio-input .el-form-item__content {
  align-items: center;
}
.radio-input .el-radio {
  flex: 1;
  border: 1px solid var(--color-main-border);
  background-color: var(--color-white-10);
  border-radius: 10px;
  transition: all 0.3s linear;
  margin: 0 10px;
  justify-content: center;
  height: 32px;
  & .el-radio__label {
    border: none;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
  }
}
.radio-input .el-radio.is-checked {
  border: 1px solid var(--color-theme-border);
  background-color: var(--color-main);
  color: var(--color-white-10);
  .el-radio__label{
    border: none;
    background-color: transparent;
    color: var(--color-white-10);
  }
}
// 通用的带背景色和边框、圆角的灰色容器
.common-item {
  height: 80px;
  border: 1px solid var(--color-main-border);
  border-radius: 15px;
  padding: 0 15px;  
  background-color: var(--color-gray-2);
  overflow: hidden;
  margin-top: 15px;
  transition: all 0.2s linear;
  @include flex-all-center;
  .condition-label {
    width: 30%;
    text-align: center;
    @include text-overflow-ellipsis;
  }
  .condition-input {
    width: 60%;
  }
  .el-form-item.condition-input {
    margin-bottom: 0;
  }
}
.show-item {
  @include flex-all-center;
  .show-label {
    width: 30%;
    text-align: center;
    @include text-overflow-ellipsis;
  }
  .show-content {
    width: 60%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 1px solid var(--color-main);
    background-color: var(--color-white-8);
    border-radius: 8px;
    @include text-overflow-ellipsis;
  }
}
.parameter-form-item {
  height: 80px;
  padding: 0 20px;
  overflow: hidden;
  transition: all 0.2s linear;
  @include flex-all-center;
  .condition-label {
    width: 30%;
    text-align: center;
    @include text-overflow-ellipsis;
  }
  .condition-input {
    width: 60%;
  }
  .el-form-item.condition-input {
    margin-bottom: 0;
  }
}
.item-3 {
  width: 30%
}
.item-5 {
  width: 49%;
}
.item-10 {
  width: 100%;
  height: auto;
  padding: 20px 0;
  .condition-label {
    width: 15%;
  }
  .condition-input {
    width: 80%;
  }
}
.item-10-spe {
  width: 100%;
  .condition-label {
    width: 15%;
  }
  .condition-input {
    width: 80%;
  }
  &::v-deep .el-form-item__content {
    align-items: center!important;
  }
}
// 通用的装common-item的布局行
.common-row {
  width: 100%;
  @include flex-center-around;
}
// common-row 同级类布局行flex项两端布局
.row-between {
  justify-content: space-between;
}
.row-around {
  justify-content: space-around;
}
// 上传组件上传中增加内边距类
.item-upload {
  padding-bottom: 50px!important;
}
// 表格部分
// 外部总容器
.data-show {
  @include content;
  margin-top: 15px;
  overflow: hidden;
  // 操作按钮头部部分
  .data-actions {
    height: 50px;
    background-color: var(--color-gray-2);
    border-bottom: 1px solid var(--color-main-border);
    padding: 0 20px;
    // @include shadow;
    @include flex-center-start;
    // 里面的按钮
    .action {
      width: 100px;
      font-size: 16px;
      color: var(--color-main);
      // text-shadow: 0 1px 2px #8aaeee, 0 2px 6px rgba(0, 0, 0, .5);
      @include main-text-shadow;
    }
  }
  // 表格外框
  .data-table {
    padding: 10px;
    // 表格部分
    .el-table {
      border: 1px solid var(--color-main-border);
      min-height: 48vh;
    }

    // 表格为空时展示
    .el-table__empty-block {
      height: 48vh!important;
      // background-color: var(--color-main-3);
      background-color: var(--color-gray-5);
      // 无数据提示语
      .data-empty {
        color: var(--color-white-10);
        font-size: 28px;
      }
      // 无数据图标
      .data-empty-icon {
        color: var(--color-white-10);
        font-size: 80px;
      }
    }
  }
}


// 后加的页面移入公共类
// data-actions同级
.data-title-between {
  @include flex-between-center;
  .data-title-actions {
    display: flex;
  }
}
.data-action-show .data-action-show-icon {
  font-size: 24px;
  color: var(--color-main);
  font-weight: bold;
  cursor: pointer;
  @include main-text-shadow;
}
// 上传项默认样式
.upload {
  width: 100%;
  min-height: 120px;
  height: 120px;
  &::v-deep .el-upload {
    @include wh-100;
    // height: 100%!important;
    .el-upload-dragger {
      @include wh-100;
      border-color: var(--color-main);
      padding: 0;
      .upload-empty {
        @include wh-100;
        @include flex-all-center;
        flex-direction: column;
        .upload-icon {
          font-size: 30px;
          color: var(--color-gray-10);
        }
        .upload-des {
          color: var(--color-gray-10);
        }
      }
      .upload-content {
        @include wh-100;
        @include flex-all-center;
        flex-direction: column;
        .upload-icon {
          font-size: 30px;
          color: var(--color-main);
        }
        .upload-des {
          color: var(--color-main);
        }
      }
    }
  }
}
.btn-groups {
  margin-top: 20px;
  text-align: center;
  .btn {
    margin: 0 20px;
  }
}
.el-message-template {
  width: 300px;
}
.el-message-list {
  width: 100%;
  margin: 10px 0; 
  padding: 0 20px;
  & > li {
    width: 100%;
    display: flex;
    align-items: center;
  }
}
